Next | Prev | Up | Top | Contents | Index

Managing Activity Processes

The FRS control process creates the initial set of activity processes by calling frs_enqueue() prior to starting the Frame Scheduler. All the enqueued processes must call frs_join() before scheduling can begin. However, the FRS controller can change the set of activity processes dynamically while the Frame Scheduler is working, using the following functions:

frs_getqueuelen() Get the number of processes currently in the queue for a specified minor frame.
frs_readqueue() Return the PID values of all queued processes for a specified minor frame as a vector of integers.
frs_premove() Remove a process (specified by PID) from a minor frame queue.
frs_pinsert() Insert a process (specified by PID and discipline) into a given position in a minor frame.

Using these functions, the FRS controller can change the queueing discipline of a process (by removing it and inserting it with a new discipline). The FRS controller can suspend a process by removing it from its queue; or can restart a process by putting it back in its queue.

Note: When an activity process is removed from the last or only queue it was in, it is returned to the normal IRIX scheduler and can begin to execute on some other CPU.When an activity process is removed from a queue, a signal may be sent to the removed process (see "Handling Signals in an Activity Process"). If a signal is sent to it, it will begin executing in its specified or default signal handler; otherwise, it will simply begin executing following frs_yield(). Once returned to the IRIX scheduler, a call to an FRS function such as frs_yield() returns an error (this also can be used to indicate the resumption of normal scheduling). The FRS controller can also enqueue new processes that have not been scheduled before. The Frame Scheduler does not reject an frs_pinsert() call for a process that has not yet joined the scheduler. However, a process must call frs_join() before it can be scheduled.

If an enqueued process should be terminated for any reason, the Frame Scheduler removes the process from all queues in which it appears.


Next | Prev | Up | Top | Contents | Index